package cn.school.mybatis.service;

import java.util.List;

import org.apache.ibatis.session.SqlSession;

import cn.school.mybatis.dao.GradeDao;
import cn.school.mybatis.pojo.Grade;
import cn.school.mybatis.util.MyBatisUtil;

public class GradeService {
	public List<Grade> select() {
		SqlSession s = MyBatisUtil.get();
		try {
			GradeDao dao = s.getMapper(GradeDao.class);
			List<Grade> list = dao.select();
			return list;
		} finally {
			MyBatisUtil.close(s);
		}
	}
}
